basicarray = [3,5,1,2,7,9,8,13,25,32]

#Finds the sum of basicarray
sum = 0
basicarray.each { |x| sum += x}
puts sum

#Finds all ints greater than 10 in basicarray
# puts basicarray.reject { |a| a < 10}

# basicarray2 = ["John", "KB","Oliver","Cory","Matthew","Christopher"]

# shuf = basicarray2.shuffle

# print shuf

# puts basicarray2.each.reject {|x|  x.length <= 5}


# firstalpha = ('a'..'z').to_a.shuffle.first
# puts firstalpha
# lastalpha = ('a'..'z').to_a.shuffle.last
# puts lastalpha

# puts lastalpha.sub(/([aeiou])/, 'You have come across a vowel!')
# puts firstalpha.sub(/([aeiou])/,'You have come across a vowel!')

#An array that contains 10 random numbers
# fourth = Array.new(10) { rand(55..100) }

# #Prints the entire array
# print fourth

# #Prints the sorted array
# print fourth.sort

# #Prints the first and the last part of the array
# puts fourth.first
# puts fourth.last

#creates an array with 5 random character elements
# new_array = []

# 5.times do
#     new_array.push((65+rand(10)).chr)
# end

# print new_array.join

#Creates an array with 10 empty elements. Then loops
#through each element of the array, which then creates an array of 5 characters. 
#then joins them. which then takes the place of an empty element in the names array
# names2 = Array.new(10)

# print names2.map { |x| x = Array.new(5).map{|y| y = (65+rand(26)).chr}.join }
